<script setup lang="ts">
  import { request } from "@/utils/request"
  import { getCodeApi } from "@/apis/user"
  // 请求测试
  const login = async () => {
    const res = await request.post("/login/password", {
      mobile: "13211112222",
      // 密码 abc123456 测试：出现非 10000 的情况
      password: "abc12345",
    })
    console.log(res)
  }

  // 测试获取验证码
  const getMobileCode = async () => {
    const res = await getCodeApi({ mobile: "13211112222", type: "login" })
    console.log(res)
  }
</script>
<template>
  <view class="content">
    <button @click="login">测试登录</button>
    <button @click="getMobileCode">测试获取验证码</button>
    <button type="primary">按钮1</button>
    <button type="warn">按钮2</button>
  </view>
</template>
